﻿using System;

using System.Web.UI.HtmlControls;

namespace ARS.PublicTool.WebHelper.WebPage
{
    public class PageAddResource
    {
        public static void AddCss(System.Web.UI.Page page,Type type,string path)
        {
            HtmlLink link1 = new HtmlLink();
            link1.Attributes["type"] = "text/css";
            link1.Attributes["rel"] = "stylesheet";
            link1.Attributes["href"] = page.ClientScript.GetWebResourceUrl(type, path);
            page.Header.Controls.Add(link1);
        }

        public static void AddJavaScript(System.Web.UI.Page page, Type type, string path)
        {
            page.ClientScript.RegisterClientScriptResource(type, path);
        }
    }
}
